program PODSCHETPI;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
 n1, n2, i : integer;
 x, y : real;

begin
  i:=100000;
  n1:=0;
  n2:=0;
  randomize;
  for i:=0 to i do
  begin
    x:=2*random;
    y:=2*random;
    if ((x-1)*(x-1)+(y-1)*(y-1)<=1) then
    begin
      n1:=n1+1;
      n2:=n2+1
    end
    else
      n2:=n2+1;
  end;
  writeln(4*n1/n2);

end.
 